package com.butuh.uang.tuh.ang.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

public class HomeListResult extends BaseResult implements Parcelable {

    Data body;

    public class Data implements Parcelable {
        int Head;
        int pageFrame;
        List<HomeListBean> datum;

        public int getHead() {
            return Head;
        }

        public void setHead(int head) {
            Head = head;
        }

        public int getPageFrame() {
            return pageFrame;
        }

        public void setPageFrame(int pageFrame) {
            this.pageFrame = pageFrame;
        }

        public List<HomeListBean> getDatum() {
            return datum;
        }

        public void setDatum(List<HomeListBean> datum) {
            this.datum = datum;
        }

        @Override
        public String toString() {
            return "Data{" +
                    "Head=" + Head +
                    ", pageFrame=" + pageFrame +
                    ", datum=" + datum +
                    '}';
        }


        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(this.Head);
            dest.writeInt(this.pageFrame);
            dest.writeTypedList(this.datum);
        }

        public Data() {
        }

        protected Data(Parcel in) {
            this.Head = in.readInt();
            this.pageFrame = in.readInt();
            this.datum = in.createTypedArrayList(HomeListBean.CREATOR);
        }

        public final Parcelable.Creator<Data> CREATOR = new Parcelable.Creator<Data>() {
            @Override
            public Data createFromParcel(Parcel source) {
                return new Data(source);
            }

            @Override
            public Data[] newArray(int size) {
                return new Data[size];
            }
        };
    }

    public Data getBody() {
        return body;
    }

    public void setBody(Data body) {
        this.body = body;
    }

    @Override
    public String toString() {
        return "HomeListResult{" +
                "body=" + body +
                '}';
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeParcelable(this.body, flags);
    }

    public HomeListResult() {
    }

    protected HomeListResult(Parcel in) {
        this.body = in.readParcelable(Data.class.getClassLoader());
    }

    public static final Parcelable.Creator<HomeListResult> CREATOR = new Parcelable.Creator<HomeListResult>() {
        @Override
        public HomeListResult createFromParcel(Parcel source) {
            return new HomeListResult(source);
        }

        @Override
        public HomeListResult[] newArray(int size) {
            return new HomeListResult[size];
        }
    };
}
